<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title><style>
        .box{
            width: 200px;
            height: 300px;
            background-color: aqua;

        }
    </style>
</head>
<body>
    <div class="box">2345</div>
</body>
<script>
    var obox = document.getElementsByClassName('obox')
    console.log(obox)
    console.log(obox.offsetWidth,obox.offsetTop)
</script>
</html>